/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model.negocio;

import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import model.beans.TipoUsuario;
import model.dao.TipoUsuarioDAO;

/**
 *
 * @author Carol
 */
public class TipoUsuarioNegocio {
    public List<TipoUsuario> listar(){
        try {
            TipoUsuarioDAO dao = new TipoUsuarioDAO();
            List<TipoUsuario> listaTpUsuario = dao.listar();
            return listaTpUsuario;
        } catch (Exception ex) {
            return null;
        }
    }
    
    public TipoUsuario buscarPorId(int id){
        try {
            TipoUsuarioDAO dao = new TipoUsuarioDAO();
            TipoUsuario tipo = dao.buscarPorId(id);            
            return tipo;
        } catch (Exception ex) {
            return null;
        }
    }
    
}
